package com.itheima.a03staticdemo03;

import java.util.ArrayList;

public class StudentUntil {

    private StudentUntil() {}

    public static int getAgeMax(ArrayList<Student> list) {
        int max = list.get(0).getAge();

        for (Student student : list) {
            int tempAge = student.getAge();
            if(tempAge > max) {
                max = tempAge;
            }
        }

        return max;
    }
}
